package org.rohmh.security.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.rohmh.generic.entity.UUIDEntity;


@Entity
public class Authorities extends UUIDEntity<Authorities> {

	@Id
	@OneToOne
	@JoinColumn(name = "username")
	private Users username;
	private String authority;

	public Authorities() {
		// TODO Auto-generated constructor stub
	}

    public Authorities(Users username, String authority) {
        this.username = username;
        this.authority = authority;
    }

	public Users getUsername() {
		return username;
	}

	public void setUsername(Users username) {
		this.username = username;
	}

	public String getAuthority() {
		return authority;
	}

	public void setAuthority(String authority) {
		this.authority = authority;
	}
}
